package cn.edu.scau.cmi.yejiancong.ORM.client;

import cn.edu.scau.cmi.yejiancong.ORM_hibernate.entiry.Student;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Stage;
import javafx.scene.control.TextArea;

import javafx.scene.control.TableView;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TableColumn;

public class viewController {
	@FXML
	private Button tostudent;
	@FXML
	private Button toteacher;
	
	public viewController() {
		// TODO Auto-generated constructor stub
	}
	

	public void toStudent() {
		Stage stage=null;
		try {
			client.select=0;
			Parent root=FXMLLoader.load(getClass().getResource("seeview.fxml"));
			Scene scene=new Scene(root);
			stage=new Stage();
			stage.setScene(scene);
			stage.setTitle("Student View");
			stage.show();
		} catch (Exception e) {
			e.printStackTrace();// TODO: handle exception
		}
	}
	public void toTeacher() {
		Stage stage=null;
		try {
			client.select=1;
			
			Parent root=FXMLLoader.load(getClass().getResource("seeview.fxml"));
			Scene scene=new Scene(root);
			stage=new Stage();
			stage.setScene(scene);
			stage.setTitle("Teacher View");
			stage.show();
		} catch (Exception e) {
			e.printStackTrace();// TODO: handle exception
		}
	}

}
